<?
/*----------------------------------------------------------------------
          (C) Bobtail-Bear 2006 	小飞熊新一代下载系统
          	代码编写：小飞熊	版权所有：小飞熊[L.F.Bear]
				官方网站/技术支持：http://www.bobtail-bear.cn
------------------------------------------------------------------------
          (C) Bobtail-Bear 2006 	L.F.Bear's New Download Sysytem
          	Powered by L.F.Bear  Copyright L.F.Bear's Home(R)
               Official Web/Support：http://www.bobtail-bear.cn
-----------------------------------------------------------------------*/

//本页脚本功能：头函数及head页面

//@error_reporting(E_ERROR | E_WARNING | E_PARSE);
if(file_exists("install.php"))
{
if(file_exists("include/install.lck"))
die("<br>The System has already installed successfully! Please delete the file which named 'install.php'.");
else die("<br>The System has NOT installed yet! Please run the file which named 'install.php' first.");
}
ob_start();
//取得计时时间戳
function getmicrotime() {
list($usec, $sec) = explode(" ",microtime()); 
return ((float)$usec + (float)$sec); 
}
$microtime_begin=getmicrotime();
//头调用开始
session_start();
require_once("include/config.base.php");
require_once("include/config.inc.php");
require_once("language/{$syslang}/front.php");
require_once("function.php");
//模版配置初始化
if(file_exists("include/template.php"))
{
$_CONFIG['template_dir']='template/'.$t_path.'/';
$_CONFIG['cache_lifetime']=$tc_time;
}
@require("include/template.php");
$imagepath="template/".$t_path."/images";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- this page is saved from <?=$system_http?> -->
<!-- Bobtail-Bear 2006 Powered by L.F.Bear-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$encode?>" />
<meta name="author" content="L.F.Bear,小飞熊,lfbear@yeah.net" />
<meta name="description" content="<?=$web_name?><?=$p_lang[211]?>" />
<meta name="keywords" content="<?=$system_keyword?>" />
<meta name="copyright" content="<?=$system_name?>" /> 
<title><?=$system_name?>---<?=$p_title[$thispage]?> [Powered by L.F.Bear]</title>
<link href="<?=$imagepath?>/style.css" rel="stylesheet" type="text/css" />
<SCRIPT language=javascript>
<!--
function gotourl(oburl)  {
	var oburl;
 this.location=oburl;
}
function bookmarkit(){
window.external.addFavorite('<?=$system_http?>','<?=$system_name?>')
}
-->
</SCRIPT>
<?
$classfile="include/class.php";
if (file_exists($classfile)) {
	$classdata=file($classfile);
	$count=count($classdata);
}
$menu="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
for ($x=0;$x<$count;$x++){
$menu_info=explode("|",$classdata[$x]);
$menu.="<a href='sort.php?mainclass=$menu_info[0]' title=$menu_info[2]>$menu_info[1]</a>&nbsp;&nbsp;";
}
//开始调入快捷方式
$topmenu=file("include/config.head.php");
$menu_num=count($topmenu);
for($i=1;$i<=$menu_num;$i++){
$link=explode("=",$topmenu[$i]);
$menu_link.="<img src=\"$imagepath/sep0.gif\"/>&nbsp;<a href=$link[1] target=\"_blank\">".$link[0]."</a>&nbsp;";
}
if($open=="n") $menu="";
?>
</head>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr class="Body1A">
    <td width="669" height="30">&nbsp;<?=$menu_link?></td>
    <td width="111"><span  onclick="var strHref=window.location.href;this.style.behavior='url(#default#homepage)';this.setHomePage('<?=$system_http?>');" style="CURSOR: hand"><img src="<?=$imagepath?>/homepage.gif" alt="<?=$p_lang[212]?>" width="25" height="25" /></span>&nbsp;&nbsp;<a style="CURSOR: hand" onClick="bookmarkit()"><img src="<?=$imagepath?>/favorites.gif" alt="<?=$p_lang[213]?>" width="25" height="25" /></a>&nbsp;&nbsp;<a style="CURSOR: hand" onclick="gotourl('mailto:<?=$admin_email?>');"><img src="<?=$imagepath?>/sendemail.gif" alt="<?=$p_lang[214]?>" width="25" height="25" /></td>
  </tr>
  <tr  class="Body1A">
    <td colspan="2"><div align="center"><img src="<?=$imagepath?>/banner.jpg" width="770" height="100" /></div></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="20" class="Body1A"><?=$p_lang[215]?><?=$p_name[$thispage]?></td>
    <td width="580" class="Body1A"></td>
  </tr>
  <tr>
    <td height="25" colspan="2" class="Body1A"><?=$p_lang[216]?><?=$menu;?></td>
  </tr>
</table>
<?	
if($open=="n") {
$fb_title1=$p_lang[217];
$fb_title2=$p_lang[218];
$fb_msg=$close;
$fb_link="index.php";
require("feedback.php");}
//是否显示搜索栏
if ($searchbar=="y")
print <<<EOT
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr class="Body1A">
    <td width="120">&nbsp;</td>
    <td width="20" align="left"><img src="$imagepath/search.gif" width="18" height="18" /></td>
    <td width="640" height="30"><form name="form1" method="post" action="search.php">
      $p_lang[219]
      <input name="whatis" type="text" id="whatis"/>
$p_lang[220]
<input name="s_type" type="hidden" id="s_type" value="1">
<input name="formindex" type="hidden" id="formindex" value="1">
<input type="checkbox" name="type_1" value=1 checked class="Radio"/>
$p_lang[221]
<input type="checkbox" name="type_2" value=1 class="Radio"/>
$p_lang[222]
<input type="submit" name="Submit" value=$p_lang[223] class="Button2"/>
&nbsp;
<input type="button" name="Submit" value=$p_lang[224]  class="Button3"  onClick="gotourl('search.php')";/>
        </form>    </td>
  </tr>
</table>
EOT;
?>